package cn.com.zpark.servlet_response;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @PackageName: cn.com.zpark.servlet_response
 * @ClassName: ResponseDemo05
 * @Description:
 * @author: RZS
 * @date: 2021/11/14  9:16
 */
@WebServlet("/rd5.jsp")
public class ResponseDemo05 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // 重定向到ResponseDemo06
        //response.sendRedirect("rd6.jsp");
        response.sendRedirect("http://www.baidu.com");
    }
}
